function diffArray(arr1, arr2) {
    // 这是一个党异伐同的过程
    const filter = (flagArr, loopArr) =>
        loopArr.filter(item => !flagArr.includes(item));
    return [...filter(arr1, arr2), ...filter(arr2, arr1)];
}

diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
